<?php

include_once '../common/common.php';
if(getLoginStatus()){
    session_start();
    $key = $_COOKIE["userkey"];
//清除COOKIES
    setcookie('userkey','',time()-10,'/');
//清除SESSION
    unset($_SESSION[$key]);

    echo '退出成功<a href="../index.php">首页</a>';
}else{
    echo '还未登入，<a href="../login.php">请先登入</a>';
}

